package com.changcheng.project.yuminsi.config;


import com.changcheng.project.yuminsi.converter.Jackson2HttpMessageConverter;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


import java.util.List;


/**
 * @author yuminsi
 * @description
 * @date 2020/8/24 14:48
 * @since
 */
@Configuration
public class WebAutoConfiguration implements WebMvcConfigurer {

    @Override
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
        converters.add(new ByteArrayHttpMessageConverter());
        converters.add(new Jackson2HttpMessageConverter());
    }
}
